﻿using System;
using K9Nano.Dependency;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace AllInOneApiTest.Authorization
{
    [ApiController]
    [Route("[controller]/[action]")]
    public class AccountController: ControllerBase
    {
        public AccountController(Lazy<Test> aa)
        {
                
        }

        [AllowAnonymous]
        public string Guest()
        {
            return "Ok";
        }

        [Authorize]
        public string UserInfo()
        {
            return User.Identity.Name;
        }
    }

    public class Test: ISingletonDependency
    {

    }
}